package base.classtest;

public class ClassMain {

	public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException {
		//Class.forName("base.classtest.A");
		//Class<?> cls = Class.forName("base.classtest.A", true, Thread.currentThread().getContextClassLoader());
		A a = (A)Class.forName("base.classtest.A", false, Thread.currentThread().getContextClassLoader()).newInstance();
		A a2 = (A)Class.forName("base.classtest.A", false, Thread.currentThread().getContextClassLoader()).newInstance();
		//Class<?> cls = Class.forName("java.lang.Class");
		//Class c = (Class)cls.newInstance();//异常
	}

}
